package com.blb.service.impl;

import com.blb.entity.Cargo;
import com.blb.entity.WareMenu;
import com.blb.mapper.CargoMapper;
import com.blb.service.ICargoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-14
 */
@Service
public class CargoServiceImpl extends ServiceImpl<CargoMapper, Cargo> implements ICargoService {
    @Resource
    private CargoMapper cargoMapper;


    @Override
    public List<Cargo> getAll() {
        return cargoMapper.getAll();
    }

    @Override
    public List<Cargo> AllCargo(String nodeId,String nodeType,String companyId,String cargoNo, String shelvesNo, String status, int start, int length) {
        return cargoMapper.getAllCargo(nodeId,nodeType,companyId,cargoNo,shelvesNo,status,start,length);
    }
    @Override
    public int count(String nodeId,String nodeType,String companyId,String cargoNo, String shelvesNo, String status) {
        return cargoMapper.count(nodeId,nodeType,companyId,cargoNo,shelvesNo,status);
    }

    @Override
    public void updateCargoStatus(String id, String status) {
        cargoMapper.updateCargoStatus(id,status);
    }

    @Override
    public List<WareMenu> findPid(String companyId) {
        return cargoMapper.findPid(companyId);
    }

    @Override
    public Cargo findCargoById(String id) {
        return cargoMapper.findCargoById(id);
    }

    @Override
    public void updateCargo(Cargo cargo) {
        cargoMapper.updateCargo(cargo);
    }


}
